stack: More readability when adding transitions
authorPhilip Chimento <philip.chimento@gmail.com>
Wed, 19 Mar 2014 00:49:46 +0000 (17:49 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 2 May 2014 20:54:41 +0000 (16:54 -0400)
commita27b0bad86b047b3bce829b57b04b9757e5c8a0e
treea318088a41960d5f5682de253a8aedec9b8abfb1
parentc05525127be5a0698db47b2765108dfaf4e54734
stack: More readability when adding transitions

This small refactor makes the code more readable when adding more
transition types that have left, right, up, and down variations.

It adds inline boolean functions to tell information about transition
types (avoiding long if clauses) and changes long chains of "else if
(transition_type == ...)" into switch statements. Both are only likely
to get longer as more transition types are added.

https://bugzilla.gnome.org/show_bug.cgi?id=726676
gtk/gtkstack.c